package com.nai365.nart.member.feign;

import com.nai365.nart.common.core.constant.SecurityConstants;
import com.nai365.nart.common.core.constant.ServiceNameConstants;
import com.nai365.nart.member.entity.WalletChange;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;

import java.math.BigDecimal;

@FeignClient(contextId = "walletChangeRemoteService", value = ServiceNameConstants.MEMBER_SERVICE)
public interface WalletChangeRemoteService {

	/**
	 * 内部调用---》
	 * @return
	 */
	@GetMapping("/walletchange/findWalletChangeByUserId/{userId}")
	public WalletChange findWalletChangeByUserId(@PathVariable("userId") Long userId,@RequestHeader(SecurityConstants.FROM) String from);

	/**
	 * 内部调用---》
	 * @return
	 */
	@GetMapping("/updateWalletChange/{userId}/{rmb}")
	public Boolean updateWalletChangeByUserId(@PathVariable("userId") Long userId,@PathVariable("rmb") BigDecimal rmb,@RequestHeader(SecurityConstants.FROM) String from);
}
